/**
 * Created by zby on 2018/3/25.
 */
public class Test3_4_2 {
    public static void main(String[] args) {
        System.out.println("求100以内的全部素数：");
        int i, j;
        for (j = 2; j <= 100; j++) {                //求100以内的素数
            for (i = 2; i <= j / 2; i++) {
                if (j % i == 0)
                    break;
            }
            if (i > j / 2)
                System.out.println("" + j + "是素数");
        }
    }
}
